passes = 100
vlength = 40
c = []
s = []
for i in range(vlength):
    c.append((1.0 * i) / (vlength * (vlength - 1)))
    s.append(i + 3)

sump = 0
sumc = 0
for i in range(vlength):
    sumc += c[i]
    sump += c[i] * s[i]
print sump, sumc
